package com.fegin.Hystrix.admin;

import com.fegin.bean.admin.SysAgreement;
import com.fegin.client.admin.SysAgreementFegin;
import com.util.Respons.ResponseUtil;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 张子艺
 * @packge com.fegin.Hystrix
 * @data 2019-01-16 10:13
 * @project currencycloud
 */
@Component
public class SysAgreementFeginHystrix implements FallbackFactory<SysAgreementFegin> {


    @Override
    public SysAgreementFegin create(Throwable throwable) {
        return new SysAgreementFegin() {
            @Override
            public Map<String, Object> insertImage(SysAgreement sysAgreement) {
                return ResponseUtil.getNotNormalMap();
            }

            @Override
            public Map<String, Object> findAgreement() {
                return ResponseUtil.getNotNormalMap();
            }
        };
    }
}
